package com.chagee.store.operation.server.feign;

import com.chagee.store.operation.common.constant.CommonConstant;
import com.chagee.store.operation.server.feign.request.PersonnelAuthRequest;
import com.chagee.store.operation.server.feign.request.UserRoleRequest;
import com.chagee.store.operation.server.feign.vo.*;
import org.springblade.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author : hk
 * @Date : 2024/12/6
 */

@FeignClient(CommonConstant.BLADE_USER)
public interface UserApi {

	/**
	 * 获取登录人的门店信息（包含门店编码）接口
	 */
	@GetMapping(CommonConstant.USER_STORE_LIST)
	R<List<UserStoreListVO>> userBindStoreList(@RequestParam(name = "userId") Long userId);

	/**
	 * 根据手机号或编码获取用户信息
	 */
	@GetMapping(CommonConstant.GET_USER_DETAIL)
	R<UserInfo> userInfoByPhone(@RequestParam(name = "phone") String phone);

	/**
	 * 权限配置
	 */
	@PostMapping(CommonConstant.GRANT)
	R<Boolean> addUserRole(@RequestBody UserRoleRequest roleIds);

}
